<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>我的订单</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta content="zh-cn" http-equiv="content-language" />
<meta content="" name="copyright" />
<%@ include file="/page/pc/include.jsp"%>
<!--[if lte IE 6]> 
<script type="text/javascript" src="js/PNG.js"></script> 
<script> 
PNG.fix('*'); 
</script> 
<![endif]-->
<style>
	#page .cz_bottom {
		width:115%;
	}
</style>
</head>
<body style="background: #f5f5f5">
	
	<div class="popbox" id="cancel_box" style="display: none">
		<div class="cancel_box">
			<div class="hd">
				<h3>选择取消原因</h3>
				<span><a id="btn_close_cancel_x" href="javascript:void(0)">&nbsp;</a>
				</span>
			</div>
			<div class="bd">
				<div class="cancel_list">
					<ul id="order_cancel_reason">
						<c:forEach items="${cancelReasonList }" var="reason" varStatus="ri">
							<li><label ${ri.index == 0 ? 'class=\"checked\"' : '' }>${reason.keyIntro }</label></li>
						</c:forEach>
					</ul>
				</div>
				<div class="cancel_ddbtnlist">
					<p>
						<input id="btn_confirm_cancel" type="button" class="inputbtn1" value="确定" />
						<input id="btn_close_cancel"type="button" class="inputbtn2" value="关闭" />
					</p>
				</div>
			</div>
		</div>
	</div>
	
	<div class="popbox" id="qrsh_box" style="display: none">
		<div class="qrsh_box">
			<div class="hd">
				<h3>确认收货</h3>
				<span> <a href="javascript:void(0)"></a>
				</span>
			</div>
			<div class="bd">
				<div class="qrsh_box1">
					<strong> <img
						src="${rootPath}/statics/images/icon_success2.png" />
					</strong>
					<div class="txt1">
						<h2>确认收货成功！</h2>
						<p>
							<a href="javascript:void(0)" class="btn1">立即评价</a><a href="#" class="btn2">关闭</a>
						</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<div class="popbox" style="display: none" id="bfsh_box">
		<div class="bfsh_box"  id="sign_list" style="width:900px; height:400px; overflow:auto;padding-bottom:20px;">
			<div class="hd">
				<h3>确认收货</h3>
				<span> <a id="btn_confirm_win_close" href="javascript:void(0)"></a>
				</span>
			</div>
		</div>
	</div>
	<div class="wrap">

		<!---头部公共部分开始-->
		<div class="header">
			<jsp:include page="../header_top.jsp" />
		</div>
		<div class="member_header">
			<div class="member_header_con">
				<h1>
					<a href="${rootPath}/pc/index"><img src="${rootPath}/statics/images/logo5.png" /></a>
				</h1>
				<div class="member_nav">
					<ul>
						<%-- <li><a class="a1" href="${rootPath}/pc/index">首页</a></li>
						<li onmouseover="this.className='hover'"
							onMouseOut="this.className=''"><a href="javascript:void(0)" class="a1">账户管理<i></i></a>
							<dl>
								<dd>
									<p>
										<span>账户管理</span><i></i>
									</p>
								</dd>
								<dt>
									<a href="<%=basePath%>/pc/my"><p>我的信息</p></a>
								</dt>
								<dt>
									<a href="<%=basePath%>/pc/my/mypwd"><p>修改密码</p></a>
								</dt>
								<dt>
									<a href="<%=basePath%>/pc/my/address"><p>收货地址</p></a>
								</dt>
							</dl></li> --%>
					</ul>
				</div>
				<div class="member_header_right">
					<div class="search_part11">
						<form action="${rootPath}/pc/product/search" method="post">
							<input type="text" name="searchKey" class="inputstyle11" /> 
							<input type="submit" class="inputbtn11" value="搜索" />
						</form>
					</div>
					<div class="cart_part1">
						<p>
							<a href="${rootPath}/pc/shoppingcart/list" target="_blank"><i></i><span>我的购物车</span><em id="shopCount">0</em></a>
						</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	</div>
	<!---头部公共部分结束-->


	<div class="site_wrap18">
		<div class="site_wrap18_con">
			<div class="main">
				<div class="rightitem">
					<div class="dd_part">
						<div class="hd">
							<h3>我的订单</h3>
						</div>
						<div class="bd">
							<div class="dd_part1">
								<div class="hd1">
									<div class="left">
										<ul>
											<li ${(orderStatus == null || orderStatus == '') && (payStatus == null || payStatus == '') ? "class='current'" : ""}><a href="${rootPath}/pc/order/list">全部订单<i></i></a></li>
											<li ${orderStatus == "01" ? "class='current'" : ""}><a href="${rootPath}/pc/order/list?orderStatus=01">待付款<i></i><em id="wait_pay_count" style="display:none;">0</em></a></li>
											<li ${orderStatus == "02" ? "class='current'" : ""}><a href="${rootPath}/pc/order/list?orderStatus=02">待审核<i></i></a></li>
											<li ${orderStatus == "04" ? "class='current'" : ""}><a href="${rootPath}/pc/order/list?orderStatus=04">待发货<i></i></a></li>
											<li ${orderStatus == "05" ? "class='current'" : ""}><a href="${rootPath}/pc/order/list?orderStatus=05">待收货<i></i></a></li>
											<li ${orderStatus == "07" ? "class='current'" : ""}><a href="${rootPath}/pc/order/list?orderStatus=07">已完成<i></i></a></li>
											<li ${(payModel== "02" && payStatus == "01" )? "class='current'" : ""}><a href="${rootPath}/pc/order/list?payModel=02&payStatus=01">欠款<i></i><em id="debt_pay_count"  style="display:none;">0</em></a></li>
											<li ${orderStatus == "03" ? "class='current'" : ""}><a href="${rootPath}/pc/order/list?orderStatus=03">未通过<i></i><em id="not_pass_count" style="display:none;">0</em></a></li>
											<li ${(isOver == "1" && payStatus == "01" ) ? "class='current'" : ""}><a href="${rootPath}/pc/order/list?isOver=1&payStatus=01">已逾期<i></i></a></li>
											<li ${orderStatus == "06" ? "class='current'" : ""}><a href="${rootPath}/pc/order/list?orderStatus=06"">已取消<i></i></a></li>
										</ul>
									</div>
									<div class="right">
										<form id="order_list_form" action="${rootPath}/pc/order/list" method="post">
											<div class="search_part12">
												<input type="hidden" name="orderStatus" value="${orderStatus }"/>
												<input type="hidden" name="payModel" value="${payModel }"/>
												<input type="hidden" name="payStatus" value="${payStatus }"/>
												<input type="hidden" name="isOver" value="${isOver }"/>
												<input id="search_key" name="searchKey" type="text" class="inputstyle1"  value="${searchKey}" placeholder="商品名称/商品编号/订单号" /> 
												<input id="btn_search_order" type="button" class="inputbtn1" value="&nbsp;" />
											</div>
										</form>
									</div>
								</div>
								<div class="bd1">
									<div class="mytable2">
										<div class="hd2">
											<ul>
												<li class="a1">订单详情</li>
												<li>收货人</li>
												<li>金额</li>
												<li>全部状态</li>
												<li>操作</li>
											</ul>
										</div>
										<div class="bd2">
											<dl>
												<c:forEach items="${orderList}" var="order">
												<dt>
													<table>
														<thead>
															<td colspan="5" style="text-align: left">${order.orderTimeStr}<span></span> 订单号：<b
																onmouseover="this.className='hover'"
																onMouseOut="this.className=''">${order.orderCode }
																	<h4>
																		<strong><a href="javascript:void(0)">复制</a></strong><i></i>
																	</h4>
															</b>
															</td>
														</thead>
														<style>.m_piclist{margin-bottom:-10px}.m_piclist .mypic8{border-bottom:1px solid #cccccc;padding-bottom:10px;margin-bottom:10px}.m_piclist .mypic8:last-child{padding-bottom:0;border-bottom:none;margin-bottom:none}</style>
														<tbody>
															<tr>
																<td class="a11"><div class="m_piclist">
																	<c:forEach items="${order.productList }" var="product">
																	<div class="mypic8">
																		<div class="pic">
																			<a href="javascript: window.open('${rootPath }/pc/product/toDetail?productCode=${product.productCode }')">
																				<img src="${imgRootURL}/${product.imagePath}${ossImgZoomPC}" />
																			</a>
																		</div>
																		<div class="item-info">
																			<h2>
																				<a href="javascript: window.open('${rootPath }/pc/product/toDetail?productCode=${product.productCode }')">
																					${product.productName}
																				</a>
																			</h2>
																			<h3>
																				<c:forEach items="${product.productSpecList }" var="spec">
																					${spec.specName }：${spec.specValue}<br/>
																				</c:forEach>
																			</h3>
																			<h3>x ${product.buyNum } </h3>
																		</div>
																	</div>	
																	</c:forEach></div>
																</td>
																<td class="a12">${order.receiverName}</td>
																<td class="a13"><div class="je_part">
																		<h4>总计￥<fmt:formatNumber type="number" value="${order.realPayMoney}" pattern="0.00" /></h4>
																		<h5>${order.payModelName }</h5>
																	</div></td>
																<td class="a14">
																	<div class="zt_part">
																		<h2>${order.orderStatusName}</h2>
																		<h3>
																			<a href="${rootPath}/pc/order/detail?orderCode=${order.orderCode}">详情</a>
																		</h3>
																		<h4>
																			<strong><i class="icon1"></i><span>￥<fmt:formatNumber type="number" value="${order.pointsMoney}" pattern="0" /></span></strong>
																			<br/>
																			<strong><i class="icon2"></i><span>￥<fmt:formatNumber type="number" value="${order.couponMoney}" pattern="0" /></span></strong>
																		</h4>
																	</div>
																</td>
																<td class="a15">
																	<input type="hidden"  id="order_code" value="${order.orderCode}"/>
																	<%--待支付 --%>
																	<c:if test="${order.orderStatus == '01' && order.payModel == '01' }">
																		<c:if test="${order.adjustPriceFlag == '2' }">
																			<a href="javascript:void(0)" class="btn5"><span>正在等待后台调整运费.....,请稍后支付</span></a>
																		</c:if>
																		<c:if test="${order.adjustPriceFlag != '2' }">
																			<a id="btn_pay_order" href="javascript:void(0)" class="btn1">立即付款</a>
																			<a id="btn_cancel_order" href="javascript:void(0)" class="btn2 cancelbtn">取消订单</a>
																		</c:if>
																	</c:if>
																	<%--待支付 且 货到付款时上传合同 --%>
																	<c:if test="${order.orderStatus == '09' && order.payModel == '02' }">
																		<a id="btn_upload_contract" href="javascript:void(0)" class="btn1 qrshbtn1">上传合同</a>
																		<a id="btn_cancel_order" href="javascript:void(0)" class="btn2 cancelbtn">取消订单</a>
																	</c:if>
																	<%-- 货到付款 已签收 待支付状态  --%>
																	<c:if test="${order.orderStatus == '01' && order.payModel == '02'}">
																		<%--货到付款 已签收 核销驳回重新支付 --%>
																		<c:if test="${order.approveResult == '02' }">
																			<a href="javascript:void(0)" class="btn5"><span>${order.approveReason}</span></a>
																		</c:if>
																		<a id="btn_pay_order" href="javascript:void(0)" class="btn1">立即付款</a>
																	</c:if>
																	
																	<c:if test="${order.orderStatus == '02' || order.orderStatus == '06'}">
																		<a href="javascript:void(0)" class="btn0" ></a>
																	</c:if>
																	
																	<%--待审核  且 审核驳回--%>
																	<c:if test="${order.orderStatus == '03' && order.approveResult == '02'}">
																		<c:if test="${order.payModel == '01'}">
																			<a href="javascript:void(0)" class="btn5"><span>${order.approveReason}</span></a>
	                                                						<a id="btn_reupload_pay_voucher"  href="javascript:void(0)" class="btn1">上传支付凭证</a>
																		</c:if>
																		<c:if test="${order.payModel == '02'}">
																			<a href="javascript:void(0)" class="btn5"><span>${order.approveReason}</span></a>
	                                                						<a id="btn_upload_contract"  href="javascript:void(0)" class="btn3">重新上传合同</a>
																		</c:if>
																		<a id="btn_cancel_order" href="javascript:void(0)" class="btn2 cancelbtn">取消订单</a>
																	</c:if>
																	<%--待发货 --%>
																	<c:if test="${order.orderStatus == '04' && order.showSign =='true' }">
																		<a id="btn_full_sign" href="javascript:void(0);" class="btn1 qrshbtn1">部分收货</a>
																	</c:if>
																	<%--待收货 --%>
																	<c:if test="${order.orderStatus == '05' }">
																		<a id="btn_full_sign" href="javascript:void(0);" class="btn1 qrshbtn1">确认收货</a>
																	</c:if>
																	<%--已取消 --%>
																	<c:if test="${order.orderStatus == '06' }">
																		&nbsp;
																	</c:if>
																	<%--已完成  已付款 的订单进行评价--%>
																	<c:if test="${order.orderStatus == '07' && order.payStatus == '02' && order.appraiseFlag ne 1 }">
																		<a id="btn_appraise"  href="javascript:void(0)" class="btn1">评价</a>
																	</c:if>
																	<%--已完成  未支付--%>
																	<c:if test="${order.orderStatus == '08' && order.payModel =='02' && order.payStatus == '01' }">
																		<a id="btn_pay_order" href="javascript:void(0)" class="btn1">立即付款</a>
																	</c:if>
																	<a id="btn_download_contact" href="javascript:void(0)" class="btn2 cancelbtn">下载合同</a>
																</td>
															</tr>
														</tbody>
													</table>
												</dt>
												</c:forEach>
												<c:if test="${fn:length(orderList) != 0 }">
													<div id="page">
														<jx:paging formID="order_list_form" isShowJumpToButton="true" numPerPage="${pageBean.numPerPage }" isShowpageCount="true"></jx:paging>
													</div>
												</c:if>
												<c:if test="${fn:length(orderList) == 0 }">
													<dt style="text-align: center;"><span>暂无订单</span></dt>
												</c:if>
											</dl>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>

				</div>
			</div>
			<jsp:include page="./_my_left.jsp" />
		</div>
	</div>


	<div>
		<!---网站底部开始-->
		<jsp:include page="../footer.jsp?showQaFlag=0" />
		<!---网站底部结束-->
	</div>


<script type="text/javascript" src="<%=basePath%>/statics/plugins/layer/layer.js"></script>
<script type="text/javascript">

$(function() {
	/**
	 * 获取购物车数量
	 */
	$.ajax({
		type: 'POST',
		url: rootPath + "/pc/shoppingcart/getShoppingcarCount",
		async: true,
		dataType: 'json',
		success: function(json) {
			if(json.code == '1') {
				$("#shopCount").html(json.data);
			}
		}
	});
});

$(function(){
	$('.cancel_list ul li label').click(function(){
		if($(this).hasClass('checked')){
			$(this).addClass('checked');$(this).parent().find('input').attr('checked','checked')
		}else{
			$(this).parent().find('input').attr('checked','checked');$(this).parent().siblings().find('input').attr('checked','');
			$(this).addClass('checked');$(this).parent().siblings().find('label').removeClass('checked');
		}
	});
	
	
	
	// 异步查询待付款、欠款订单、未通过订单数量
	var url = rootPath + "/pc/order/listOrderStatusCount";
	$.ajax({
		type: 'POST',
		url: url,
		async: true,
		data: {},
		dataType: 'json',
		success: function(json) {
			if(json && json.orderCount){
				if(json.orderCount.waitPayCount > 0){
					$("#wait_pay_count").show();
					$("#wait_pay_count").text(json.orderCount.waitPayCount);
				}
				if(json.orderCount.debtPayCount > 0){
					$("#debt_pay_count").show();
					$("#debt_pay_count").text(json.orderCount.debtPayCount);
				}
				if(json.orderCount.notPassCount > 0){
					$("#not_pass_count").show();
					$("#not_pass_count").text(json.orderCount.notPassCount);
				}
				if(json.orderCount.overDuedCount > 0){
					$("#overDuedCount").show();
					$("#overDuedCount").text(json.orderCount.overDuedCount);
				}
			}
		},
		error:function(){
			
		}
	})
	
	var order_code = "";
	// 取消订单
	$("a[id='btn_cancel_order']").each(function(){
		$(this).click(function(){
			order_code = $(this).parent().find("#order_code").val();
			$('#cancel_box').toggle();
		});
	});
	$("#btn_close_cancel_x").click(function(){
		$('#cancel_box').toggle();
	});
	// 关闭取消窗口
	$("#btn_close_cancel").click(function(){
		$('#cancel_box').toggle();
	});
	// 确认取消
	$("#btn_confirm_cancel").click(function(){
		var cancel_reason = $("#order_cancel_reason").find("label.checked").text();
		var url = rootPath +"/pc/order/cancelOrder";
		var form = $('<form></form>');  
		form.attr('action', url);
		form.attr('method', 'post');
		form.attr('target', '_self');
		form.append("<input type='hidden' name='orderCode'  value='"+order_code+"'/>");
		form.append("<input type='hidden' name='cancelReason'  value='"+cancel_reason+"'/>");
		form.appendTo("body");
		form.submit();
	});
	
	
	// 下载合同
	$("a[id='btn_download_contact']").each(function(){
		$(this).click(function(){
			var order_code = $(this).parent().find("#order_code").val();
			var url = rootPath + "/pc/order/toPrintOrderContract?orderCode="+order_code;
		    layer.open({
		    	  type: 2,
		    	  title: '订单合同',
		    	  shadeClose: true,
		    	  shade: 0.8,
		    	  area: ['780px', '90%'],
		    	  content: url
		    });
		});
	});
	
	// 去支付
	$("a[id='btn_pay_order']").each(function(){
		$(this).click(function(){
			var order_code = $(this).parent().find("#order_code").val();
			var url = rootPath +"/pc/order/toOrderPay";
			var form = $('<form></form>');  
		    form.attr('action', url);  
		    form.attr('method', 'post');
		    form.attr('target', '_self');
		    form.append('<input type="hidden" name="orderCode" value="'+order_code+'"/>');
		    form.appendTo("body");
		    form.submit();
		});
	});
	
	//去评价
	$("a[id='btn_appraise']").each(function(){
		$(this).click(function(){
			var order_code = $(this).parent().find("#order_code").val();
			var url = rootPath +"/pc/evaluation/toOrderEvaluation?orderCode="+order_code;
			window.open(url);
		});
	});
	
	// 重新支付
	$("a[id='btn_reupload_pay_voucher']").each(function(){
		$(this).click(function(){
			var order_code = $(this).parent().find("#order_code").val();
			var url = rootPath +"/pc/order/toOrderPay";
			var form = $('<form></form>');  
		    form.attr('action', url);  
		    form.attr('method', 'post');
		    form.attr('target', '_self');
		    form.append('<input type="hidden" name="orderCode" value="'+order_code+'"/>');
		    form.appendTo("body");
		    form.submit();
		});
	});
	
	// 上传合同
	$("a[id='btn_upload_contract']").each(function(){
		$(this).click(function(){
			var order_code = $(this).parent().find("#order_code").val();
			var url = rootPath +"/pc/order/toUploadOrderContract";
			var form = $('<form></form>');  
			form.attr('action', url);  
			form.attr('method', 'post');
			form.attr('target', '_self');
			form.append("<input type='hidden' name='orderCode'  value='"+order_code+"'/>");
			form.appendTo("body");
			form.submit();
		});
	});
	
	// 全部收货
	$("a[id='btn_full_sign']").each(function(){
		$(this).click(function(){
			var order_code = $(this).parent().find("#order_code").val();
			var url = rootPath +"/pc/order/toConfirmSign";
			$.ajax({
				type: 'POST',
				url: url,
				async: true,
				data: {orderCode:order_code},
				dataType: 'json',
				success: function(json) {
					$("#sign_list").find("div:gt(0)").remove();
					var bd = "";
					if(json && json.deliveredList){
						console.log(json.deliveredList);
						for(var i = 0 ;i <json.deliveredList.length ; i++){
							var delivery = json.deliveredList[i];
							bd += "<div class=\"bd\" style=\"padding-top:10px;font-size: 14px;\">"+
							"				<span>运单："+delivery.deliveryCode+"</span><span>&nbsp;&nbsp;快递公司："+delivery.deliveryCompanyName+"</span><span>&nbsp;&nbsp;签收状态："+(delivery.signStatus=="01"?"待签收":"已签收")+"</span>"+
							"				<table class=\"mytable1\">"+
							"					<thead>"+
							"						<tr>"+
							"							<td style=\"width: 630px;\"><div style=\"margin-left:-14px;\">商品信息</div></td>"+
							"							<td style=\"text-align: center\">数量</td>"+
							"						</tr>"+
							"					</thead>"+
							"					<tbody>";
							
							for(var j = 0; j < delivery.deliveredProductList.length ; j++){
								var product = delivery.deliveredProductList[j];
								bd += "					<tr>"+
								"							<td>"+
								"								<div class=\"mypic9\">"+
								"									<div class=\"pic\">"+
								"										<img src=\""+imgRootURL+product.imagePath+"\" />"+
								"									</div>"+
								"									<div class=\"item-info\">"+
								"										<h2>"+product.productName+"</h2>"+
								"									</div>"+
								"								</div>"+
								"							</td>"+
								"							<td style=\"text-align: center\">X"+product.sendNum+"</td>"+
								"						</tr>";
							}
							bd += "				</tbody>"+
							"				</table>"+
							"				<div class=\"sh_btnlist\" >"+
							"					<p style=\"text-align:right;\">"+
							"						<input type=\"hidden\" id=\"order_code\" value=\""+json.order.orderCode+"\"/>"+
							"						<input type=\"hidden\" id=\"delivery_bill_id\" value=\""+delivery.id+"\"/>";
							if(delivery.signStatus == "01"){
								bd += "				<input id=\"btn_confirm_sign\" type=\"button\" class=\"inputbtn1\" value=\"确认收货\" />";
							}
							bd += "				</p>"+
							"				</div>"+
							"			</div>";
						}
					}
					$("#sign_list").append($(bd));
					// 绑定事件
					$("input[id='btn_confirm_sign']").each(function(){
						$(this).click(function(){
							var order_code = $(this).parent().find("#order_code").val();
							var bill_id = $(this).parent().find("#delivery_bill_id").val();
							var url = rootPath + "/pc/order/confirmSign";
							$.ajax({
								type: 'POST',
								url: url,
								async: true,
								data: {
									deliveryBillId:bill_id,
									orderCode:order_code
								},
								dataType: 'json',
								success: function(json) {
									if(json && json.resultCode == '1'){
										layer.msg('签收成功',{time:1000});
										setTimeout(function(){
											window.location.href=rootPath+"/pc/order/list";
										},1000);
									}
								},
								error:function(){
								}
							})
						});
					});
					$('#bfsh_box').toggle();
				},
				error:function(){
					
				}
			})
		});
	});
	
	// 关闭签收窗口
	$("#btn_confirm_win_close").click(function(){
		$('#bfsh_box').toggle();
	});
	
	// 查询订单详情
	$("div[name='order_info']").each(function(){
		$(this).click(function(){
			var order_code = $(this).find("#order_code").val();
			var url = rootPath +"/wx/order/detail";
			var form = $('<form></form>');  
			form.attr('action', url);  
			form.attr('method', 'post');
			form.attr('target', '_self');
			form.append("<input type='hidden' name='orderCode'  value='"+order_code+"'/>");
			form.appendTo("body");
			form.submit();
		});
	});
	
	// 查看详情清单
	$("div[name='product_info']").each(function(){
		$(this).click(function(){
			var order_code = $(this).parent().find("div:eq(0)").find("#order_code").val();
			var url = rootPath +"/wx/order/detailProductList";
			var form = $('<form></form>');  
			form.attr('action', url);  
			form.attr('method', 'post');
			form.attr('target', '_self');
			form.append("<input type='hidden' name='orderCode'  value='"+order_code+"'/>");
			form.appendTo("body");
			form.submit();
		});
	});
	
	// 查询订单
	$("#btn_search_order").click(function(){
		var search_key = $(this).parent().find("#search_key").val();
		var url = rootPath +"/pc/order/list";
		var form = $('<form></form>');  
		form.attr('action', url);  
		form.attr('method', 'post');
		form.attr('target', '_self');
		form.append("<input type='hidden' name='searchKey'  value='"+search_key+"'/>");
		form.appendTo("body");
		form.submit();
	});
	
});
</script>
</body>
</html>